Skip to content

feat(pymssql): add sync SQL Server adapter#570

Merged
cofin merged 10 commits into
mainfrom
codex/pymssql-adapter
Jul 2, 2026
Merged

feat(pymssql): add sync SQL Server adapter#570
cofin merged 10 commits into
mainfrom
codex/pymssql-adapter

Conversation

@cofin

@cofin cofin commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • add a sync pymssql SQL Server adapter with config, driver, connection pool, migrations, and data dictionary support
  • add adapter-local Litestar, events, and ADK store integrations
  • wire docs and deferred contract metadata while leaving active SQL Server fixture coverage for a separate integration pass

Tests

  • uv run pytest tests/unit/adapters/test_pymssql -q --tb=short
  • uv run ruff check sqlspec/adapters/pymssql tests/unit/adapters/test_pymssql
  • uv run ruff format --check sqlspec/adapters/pymssql tests/unit/adapters/test_pymssql
  • uv run python3 -c "from sqlspec.adapters.pymssql import PymssqlConfig, PymssqlDriver; from sqlspec.adapters.pymssql.adk import PymssqlADKStore; from tests.integration.adapters.contracts._cases import DEFERRED_DRIVER_CASES; assert PymssqlConfig and PymssqlDriver and PymssqlADKStore; assert any(case.id == 'pymssql-sync' for case in DEFERRED_DRIVER_CASES); print('pymssql smoke ok')"

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.51831% with 645 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.13%. Comparing base (ccf82cb) to head (b10292d).

Files with missing lines Patch % Lines
sqlspec/adapters/pymssql/adk/store.py 35.47% 228 Missing and 3 partials ⚠️
sqlspec/adapters/pymssql/litestar/store.py 22.22% 112 Missing ⚠️
sqlspec/adapters/pymssql/data_dictionary.py 28.94% 81 Missing ⚠️
sqlspec/adapters/pymssql/migrations.py 35.00% 52 Missing ⚠️
sqlspec/adapters/pymssql/core.py 62.38% 28 Missing and 13 partials ⚠️
sqlspec/adapters/pymssql/type_converter.py 0.00% 32 Missing ⚠️
sqlspec/adapters/pymssql/driver.py 69.60% 28 Missing and 3 partials ⚠️
sqlspec/adapters/pymssql/pool.py 70.83% 24 Missing and 4 partials ⚠️
sqlspec/adapters/pymssql/_typing.py 59.52% 15 Missing and 2 partials ⚠️
sqlspec/adapters/pymssql/events/store.py 69.23% 12 Missing and 4 partials ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
- Coverage   75.69%   75.13%   -0.56%     
==========================================
  Files         455      470      +15     
  Lines       60706    61935    +1229     
  Branches     9245     9364     +119     
==========================================
+ Hits        45951    46536     +585     
- Misses      11784    12399     +615     
- Partials     2971     3000      +29     
Flag Coverage Δ
integration 58.81% <0.00%> (-1.20%) ⬇️
py3.10 73.39% <47.51%> (-0.53%) ⬇️
py3.11 73.41% <47.51%> (-0.53%) ⬇️
py3.12 73.40% <47.51%> (-0.53%) ⬇️
py3.13 73.40% <47.51%> (-0.53%) ⬇️
py3.14 74.31% <46.29%> (-0.57%) ⬇️
unit 61.08% <47.51%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/adapters/pymssql/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/adk/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/events/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/litestar/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/config.py 95.45% <95.45%> (ø)
sqlspec/adapters/pymssql/events/store.py 69.23% <69.23%> (ø)
sqlspec/adapters/pymssql/_typing.py 59.52% <59.52%> (ø)
sqlspec/adapters/pymssql/pool.py 70.83% <70.83%> (ø)
sqlspec/adapters/pymssql/driver.py 69.60% <69.60%> (ø)
sqlspec/adapters/pymssql/type_converter.py 0.00% <0.00%> (ø)
... and 5 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin cofin marked this pull request as ready for review July 2, 2026 03:33
@cofin cofin merged commit 8cf814b into main Jul 2, 2026
27 checks passed
@cofin cofin deleted the codex/pymssql-adapter branch July 2, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants